package com.tourismhengyang.beans;

public class AgencyInfo {
	private int aid;
	private String aname;
	private String aintroduce;
	private String atel;
	private String aaddr;
	private double aprice;
	
	@Override
	public String toString() {
		return "AgencyInfo [aid=" + aid + ", aname=" + aname + ", aintroduce=" + aintroduce + ", atel=" + atel
				+ ", aaddr=" + aaddr + ", aprice=" + aprice + "]";
	}

	public int getAid() {
		return aid;
	}

	public void setAid(int aid) {
		this.aid = aid;
	}

	public String getAname() {
		return aname;
	}

	public void setAname(String aname) {
		this.aname = aname;
	}

	public String getAintroduce() {
		return aintroduce;
	}

	public void setAintroduce(String aintroduce) {
		this.aintroduce = aintroduce;
	}

	public String getAtel() {
		return atel;
	}

	public void setAtel(String atel) {
		this.atel = atel;
	}

	public String getAaddr() {
		return aaddr;
	}

	public void setAaddr(String aaddr) {
		this.aaddr = aaddr;
	}

	public double getAprice() {
		return aprice;
	}

	public void setAprice(double aprice) {
		this.aprice = aprice;
	}

	public AgencyInfo(int aid, String aname, String aintroduce, String atel, String aaddr, double aprice) {
		super();
		this.aid = aid;
		this.aname = aname;
		this.aintroduce = aintroduce;
		this.atel = atel;
		this.aaddr = aaddr;
		this.aprice = aprice;
	}

	public AgencyInfo() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((aaddr == null) ? 0 : aaddr.hashCode());
		result = prime * result + aid;
		result = prime * result + ((aintroduce == null) ? 0 : aintroduce.hashCode());
		result = prime * result + ((aname == null) ? 0 : aname.hashCode());
		long temp;
		temp = Double.doubleToLongBits(aprice);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((atel == null) ? 0 : atel.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AgencyInfo other = (AgencyInfo) obj;
		if (aaddr == null) {
			if (other.aaddr != null)
				return false;
		} else if (!aaddr.equals(other.aaddr))
			return false;
		if (aid != other.aid)
			return false;
		if (aintroduce == null) {
			if (other.aintroduce != null)
				return false;
		} else if (!aintroduce.equals(other.aintroduce))
			return false;
		if (aname == null) {
			if (other.aname != null)
				return false;
		} else if (!aname.equals(other.aname))
			return false;
		if (Double.doubleToLongBits(aprice) != Double.doubleToLongBits(other.aprice))
			return false;
		if (atel == null) {
			if (other.atel != null)
				return false;
		} else if (!atel.equals(other.atel))
			return false;
		return true;
	}
}
